import './assets/styles/main.scss'
import '@fortawesome/fontawesome-free/css/all.css'

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import pinia from './stores'
import { setupVant } from './plugins/vant'
import VueApexCharts from 'vue3-apexcharts'
import ApexCharts from 'apexcharts'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入公用css
import '@/common/common.css'

// 确保ApexCharts全局可用
window.ApexCharts = ApexCharts

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(router)
app.use(pinia)
app.use(ElementPlus)
app.use(VueApexCharts)
setupVant(app)

app.mount('#app')
